Optimal. Leaf size=124 \[ -\frac {5 x}{a^2}+\frac {12 \sin (c+d x)}{a^2 d}-\frac {5 \cos (c+d x) \sin (c+d x)}{a^2 d}-\frac {10 \cos ^3(c+d x) \sin (c+d x)}{3 a^2 d (1+\cos (c+d x))}-\frac {\cos ^4(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}-\frac {4 \sin ^3(c+d x)}{a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 124, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2844, 3056,
2827, 2715, 8, 2713} \begin {gather*} -\frac {4 \sin ^3(c+d x)}{a^2 d}+\frac {12 \sin (c+d x)}{a^2 d}-\frac {10 \sin (c+d x) \cos ^3(c+d x)}{3 a^2 d (\cos (c+d x)+1)}-\frac {5 \sin (c+d x) \cos (c+d x)}{a^2 d}-\frac {5 x}{a^2}-\frac {\sin (c+d x) \cos ^4(c+d x)}{3 d (a \cos (c+d x)+a)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2713
Rule 2715
Rule 2827
Rule 2844
Rule 3056
Rubi steps
\begin {align*} \int \frac {\cos ^5(c+d x)}{(a+a \cos (c+d x))^2} \, dx &=-\frac {\cos ^4(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}-\frac {\int \frac {\cos ^3(c+d x) (4 a-6 a \cos (c+d x))}{a+a \cos (c+d x)} \, dx}{3 a^2}\\ &=-\frac {10 \cos ^3(c+d x) \sin (c+d x)}{3 a^2 d (1+\cos (c+d x))}-\frac {\cos ^4(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}-\frac {\int \cos ^2(c+d x) \left (30 a^2-36 a^2 \cos (c+d x)\right ) \, dx}{3 a^4}\\ &=-\frac {10 \cos ^3(c+d x) \sin (c+d x)}{3 a^2 d (1+\cos (c+d x))}-\frac {\cos ^4(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}-\frac {10 \int \cos ^2(c+d x) \, dx}{a^2}+\frac {12 \int \cos ^3(c+d x) \, dx}{a^2}\\ &=-\frac {5 \cos (c+d x) \sin (c+d x)}{a^2 d}-\frac {10 \cos ^3(c+d x) \sin (c+d x)}{3 a^2 d (1+\cos (c+d x))}-\frac {\cos ^4(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}-\frac {5 \int 1 \, dx}{a^2}-\frac {12 \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{a^2 d}\\ &=-\frac {5 x}{a^2}+\frac {12 \sin (c+d x)}{a^2 d}-\frac {5 \cos (c+d x) \sin (c+d x)}{a^2 d}-\frac {10 \cos ^3(c+d x) \sin (c+d x)}{3 a^2 d (1+\cos (c+d x))}-\frac {\cos ^4(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}-\frac {4 \sin ^3(c+d x)}{a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.46, size = 199, normalized size = 1.60 \begin {gather*} \frac {\sec \left (\frac {c}{2}\right ) \sec ^3\left (\frac {1}{2} (c+d x)\right ) \left (-360 d x \cos \left (\frac {d x}{2}\right )-360 d x \cos \left (c+\frac {d x}{2}\right )-120 d x \cos \left (c+\frac {3 d x}{2}\right )-120 d x \cos \left (2 c+\frac {3 d x}{2}\right )+516 \sin \left (\frac {d x}{2}\right )-156 \sin \left (c+\frac {d x}{2}\right )+342 \sin \left (c+\frac {3 d x}{2}\right )+118 \sin \left (2 c+\frac {3 d x}{2}\right )+30 \sin \left (2 c+\frac {5 d x}{2}\right )+30 \sin \left (3 c+\frac {5 d x}{2}\right )-3 \sin \left (3 c+\frac {7 d x}{2}\right )-3 \sin \left (4 c+\frac {7 d x}{2}\right )+\sin \left (4 c+\frac {9 d x}{2}\right )+\sin \left (5 c+\frac {9 d x}{2}\right )\right )}{192 a^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 101, normalized size = 0.81
method | result | size |
derivativedivides | \(\frac {-\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+9 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {8 \left (-\frac {5 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {10 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}-\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2}\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}-20 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{2}}\) | \(101\) |
default | \(\frac {-\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+9 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {8 \left (-\frac {5 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {10 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}-\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2}\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}-20 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{2}}\) | \(101\) |
risch | \(-\frac {5 x}{a^{2}}+\frac {i {\mathrm e}^{2 i \left (d x +c \right )}}{4 a^{2} d}-\frac {15 i {\mathrm e}^{i \left (d x +c \right )}}{8 a^{2} d}+\frac {15 i {\mathrm e}^{-i \left (d x +c \right )}}{8 a^{2} d}-\frac {i {\mathrm e}^{-2 i \left (d x +c \right )}}{4 a^{2} d}+\frac {2 i \left (15 \,{\mathrm e}^{2 i \left (d x +c \right )}+27 \,{\mathrm e}^{i \left (d x +c \right )}+14\right )}{3 d \,a^{2} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{3}}+\frac {\sin \left (3 d x +3 c \right )}{12 a^{2} d}\) | \(143\) |
norman | \(\frac {-\frac {5 x}{a}+\frac {21 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}+\frac {143 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}+\frac {521 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a d}+\frac {230 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}+\frac {185 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a d}+\frac {11 \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}-\frac {\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )}{6 a d}-\frac {25 x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {50 x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {50 x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {25 x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {5 x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5} a}\) | \(243\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 207, normalized size = 1.67 \begin {gather*} \frac {\frac {4 \, {\left (\frac {9 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {20 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {15 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a^{2} + \frac {3 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {3 \, a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {a^{2} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}} + \frac {\frac {27 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {60 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}}}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.42, size = 108, normalized size = 0.87 \begin {gather*} -\frac {15 \, d x \cos \left (d x + c\right )^{2} + 30 \, d x \cos \left (d x + c\right ) + 15 \, d x - {\left (\cos \left (d x + c\right )^{4} - \cos \left (d x + c\right )^{3} + 6 \, \cos \left (d x + c\right )^{2} + 33 \, \cos \left (d x + c\right ) + 24\right )} \sin \left (d x + c\right )}{3 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} + 2 \, a^{2} d \cos \left (d x + c\right ) + a^{2} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 700 vs.
\(2 (117) = 234\).
time = 3.13, size = 700, normalized size = 5.65 \begin {gather*} \begin {cases} - \frac {30 d x \tan ^{6}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{6}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} - \frac {90 d x \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{6}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} - \frac {90 d x \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{6}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} - \frac {30 d x}{6 a^{2} d \tan ^{6}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} - \frac {\tan ^{9}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{6}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} + \frac {24 \tan ^{7}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{6}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} + \frac {138 \tan ^{5}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{6}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} + \frac {160 \tan ^{3}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{6}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} + \frac {63 \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{6}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 18 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} & \text {for}\: d \neq 0 \\\frac {x \cos ^{5}{\left (c \right )}}{\left (a \cos {\left (c \right )} + a\right )^{2}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.46, size = 108, normalized size = 0.87 \begin {gather*} -\frac {\frac {30 \, {\left (d x + c\right )}}{a^{2}} - \frac {4 \, {\left (15 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 20 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 9 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3} a^{2}} + \frac {a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 27 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6}}}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.50, size = 135, normalized size = 1.09 \begin {gather*} -\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )-28\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )-60\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )+40\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )-16\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )+30\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (c+d\,x\right )}{6\,a^2\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________